var myChart = echarts.init(document.getElementById("idx1"))
var option = {
    title: {
        text: '词云图--徐龙',
    },
    series:{
        type:'wordCloud',
        data:[
            {name:'赵',value:100},
            {name:'钱',value:90},
            {name:'孙',value:80},
            {name:'李',value:70},
            {name:'周',value:60},
            {name:'吴',value:50},
            {name:'郑',value:40},
            {name:'王',value:30},
        ],
    },
};
myChart.setOption(option)
//------------------------------------------
var myChart2 = echarts.init(document.getElementById("idx2"))
var dataX = [];
for(var i=100;i>0;i--){
    dataX.push({
        name:String(i),
        value:i
    });
}
var option2 = {
    title: {
        text: '词云图--徐龙',
    },
    series:{
        type:'wordCloud',
        data:dataX
    },
    rotationRange: [-45, 180, 45, 90],
};
myChart2.setOption(option2)
//------------------------------------------
var myChart3 = echarts.init(document.getElementById("idx3"))
var option3 = {
    title: {
        text: '词云图--徐龙',
    },
    series:[{
        type:'wordCloud',
        data:dataX,
        sizeRange:[10,30],
        rotationRange:[0,90],
        shape:'circle',
    }],
};
myChart3.setOption(option3)
//------------------------------------------
var myChart4 = echarts.init(document.getElementById("idx4"))
var option4 = {
    title: {
        text: '词云图--徐龙',
    },
    series:[{
        type:'wordCloud',
        data:dataX,
        sizeRange:[10,30],
        rotationRange:[0,90],
        shape:'circle',
        textStyle: {
            color:function(data){
                var v1 = String(Math.round(Math.random()*255));
                var v2 = String(Math.round(Math.random()*255));
                var v3 = String(Math.round(Math.random()*255));
                return 'rgb('+ v1 +','+ v2 +','+ v3 +')';
            }
        },
    }],
};
myChart4.setOption(option4)
//------------------------------------------
var maskImg = new Image();
maskImg.src = ''
var myChart5 = echarts.init(document.getElementById("idx5"))
var option5 = {
    title: {
        text: '词云图--徐龙',
    },
    series:[{
        type:'wordCloud',
        data:dataX,
        sizeRange:[10,30],
        maskImage:maskImg,
        rotationRange:[0,90],
        shape:'circle',
        textStyle: {
            color:function(data){
                var v1 = String(Math.round(Math.random()*255));
                var v2 = String(Math.round(Math.random()*255));
                var v3 = String(Math.round(Math.random()*255));
                return 'rgb('+ v1 +','+ v2 +','+ v3 +')';
            }
        },
    }],
};
myChart5.setOption(option5)